import { DBconfig } from '../../DataBaseConfig';
const mysql = require('mysql2');

export const sqlQuery = (sqlStr: string, arr: any[], fn: (err, results, fields) => any) => {
	const connection = mysql.createConnection(DBconfig);
	connection.query(
		sqlStr, [...arr], fn,
	);
	connection.end();
}
